import  json
from ronglian_sms_sdk import SmsSDK
from django.conf import settings
def send_message(tid,mobile,datas):
    ronglianyun = settings.RONG_LIAN_YUN
    sdk = SmsSDK(ronglianyun.get('accId'),ronglianyun.get('accToken'),ronglianyun.get('appId'))
    resp = sdk.sendMessage(tid,mobile,datas)
    response = json.loads(resp)
    print(resp)
    return response.get("statusCode") == "000000"
